from django.db import models
from utils.basemodel import BaseModel
# Create your models here.

class User(BaseModel):
    name = models.CharField(max_length=100)
    email = models.EmailField(unique=True)
    password = models.CharField(max_length=100)
    phone = models.CharField(max_length=100)
    # score= models.IntegerField(default=0,verbose_name='积分')
    way = models.IntegerField(default=0, choices=((0, '用户名密码'), (1, '手机号验证码')),verbose_name='登录方式')
    code = models.CharField(max_length=100,blank=True,null=True)


    def __str__(self):
        return self.name